<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" type="text/css" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
  <script src="/node_modules/jquery/dist/jquery.min.js"></script>
  <script src="/node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
</head>
<body>
  <%- include('../layout/header.ejs')%>

  <div class="container-fluid">
    <h1 style="text-align:center;">
      <%= article.title %>

      <% if(islogin && user.id === article.userId){ %>
        <a href="/article/edit?id=<%= article.id %>" class="btn btn-link pull-right">编辑此文章</a>
      <% } %>

    </h1>

    <p style="color:#999; font-size:12px;">
      <strong>作者昵称：</strong><%= article.nickname %>
      &nbsp;&nbsp;&nbsp;&nbsp;
      <strong>发表时间：</strong><%= article.ctime %>
    </p>

    <hr>


    <div class="content">
      <%- article.content %>
    </div>
  </div>

  <%- include('../layout/footer.ejs')%>
</body>
</html>